﻿-- ================================START====================================
-- MANUAL SCRIPT
-- Created by				Mrinmoy Das
-- Code generation Time:	<Thursday, 25 Aug, 2016   1:07:52 AM>
-- Entity/Table Name:		<Sys_RoleMaster>
-- Description:             <SQL Server Stored Procedure For GetbyRoleCode>
-- =========================================================================

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Ivy_SiteAdministration_Sys_RoleMaster_GetByRoleCode')
	BEGIN
		DROP  Procedure  [Ivy_SiteAdministration_Sys_RoleMaster_GetByRoleCode]
	END
GO

CREATE PROCEDURE [Ivy_SiteAdministration_Sys_RoleMaster_GetByRoleCode]
-- =========================================================================
-- Created by				Mrinmoy Das
-- Code generation Time:	<Thursday, 25 Aug, 2016   1:07:52 AM>
-- Entity/Table Name:		<Sys_RoleMaster>
-- Description:             <SQL Server Stored Procedure For GetbyRoleCode>
-- =========================================================================

-- Add the parameters for the stored procedure here

	(
				@RoleCode varchar(50) = NULL 
	) 
AS 
BEGIN 
	-- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements. 
	SET NOCOUNT OFF; 

    SELECT 
			[RoleKey], 
			[RoleCode], 
			[RoleName], 
			[RoleDescription], 

			[Sys_DateOfCreation], 
			[Sys_DateOfModification], 
			[Sys_CreatedByID], 
			[Sys_ModifiedByID], 
			[Sys_DeleteType], 
			[Sys_IsDeleted], 
			[Sys_OrganizationID], 
			[Sys_InitialPrimaryKeys], 
			[Sys_WorkstationName] 
    FROM 
			[Sys_RoleMaster] 
    WHERE 
		( 
			[RoleCode] = @RoleCode 
		); 

END 
GO 

-- =================================END=====================================

